<template>
  <div>
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="page"
      :page-sizes="[10, 20, 40, 60, 80]"
      :page-size="pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total">
    </el-pagination>
  </div>
</template>

<script>
import eventBus from '../../../utils/eventBus'
export default {
    props:['page','pageSize','total'],
    data() {
      return {
        // currentPage: 1,
      };
    },
    methods: {
      handleSizeChange(val) {
        this.$emit('changePageSize',val)
        console.log(`每页 ${val} 条`);
      },
      handleCurrentChange(val) {
        this.$emit('changePage',val)
        console.log(`当前页: ${val}`);
      },
      searchHander(){
            this.$emit('parentsearch',this.keyword)
      }
    }
  }
</script>

<style lang="less" scoped>
    .el-pagination{
      margin:0px 300px;
    }

</style>